<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

	<head>
		<title>NEOWIZ INTERNET Vietnam</title>
		<meta http-equiv="content-type" content="text/HTML; charset=UTF-8" />
		<link rel="icon" href="logo.ico" type="image/x-icon" />
		<link rel="stylesheet" type="text/css" href="Styles/Neowiz.css">
		<link rel="stylesheet" href="Styles/colorbox.css" />
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
		<script type="text/javascript" src="JQuery/vadilation.js"></script>
		
		<!--<script type="text/javascript" src="Popup/jquery.colorbox.js"></script>-->
		
<!-- Page styles -->
<!-- Contact Form CSS files -->
<link type='text/css' href='Styles/basic.css' rel='stylesheet' media='screen' />

<!-- IE6 "fix" for the close png image -->
<!--[if lt IE 7]>
<link type='text/css' href='Styles/basic_ie.css' rel='stylesheet' media='screen' />
<![endif]-->

<!-- JS files are loaded at the bottom of the page -->
		<script>
			$(document).ready(function(){
				/*$.ajaxSetup({
					error:function(x,e){
						var errormsg="";
						if(x.status==0){
							errormsg='Error:\n0 - You are offline!!\n Please Check Your Network.';
						}else if(x.status==404){
							errormsg='Error:\n404 - Requested URL not found.';
						}else if(x.status==500){
							errormsg='Error:\n500 - Internel Server Error.';
						}else if(e=='parsererror'){
							errormsg='Error.\nParsing JSON Request failed.';
						}else if(e=='timeout'){
							errormsg='Error:\nRequest Time out.';
						}else {
							errormsg='Error:\nUnknow Error.\n'+x.responseText;
						}
						if($('#JO_ajax_error').length){
							$('#JO_ajax_error').html(errormsg);
						}else{
							alert(errormsg);
						}
					}
				});*/
				//Examples of how to assign the ColorBox event to elements
				//$(".group1").colorbox({rel:'group1'});
				//$(".group2").colorbox({rel:'group2', transition:"fade"});
				//$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
				//$(".group4").colorbox({rel:'group4', slideshow:true});
				//$(".ajax").colorbox();
				//$(".youtube").colorbox({iframe:true, innerWidth:425, innerHeight:344});
				//$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
				//$(".inline").colorbox({inline:true, width:"50%"});
				/*$(".callbacks").colorbox({
					onOpen:function(){ alert('onOpen: colorbox is about to open'); },
					onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
					onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
					onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
					onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
				});
				
				//Example of preserving a JavaScript event for inline calls.
				
				$(".click").click(function(){ 
					$('.click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
					return false;
				});*/
			});
		</script>
	</head>

	<body>



<div id="body">

	<div style="height:60px;width:900px;">
		<a href="#"><img id="logo" src="Images/logo.png" /></a>
		<div id="head">
			<a href="#"	target="_blank">Company Profile</a>	&nbsp; | &nbsp;
			<!--<a id="a_Contact" name="a_Contact" class="ajax" href="ContacUS/ContactUS.php">Contact Us</a>-->
			<a href='#' class='basic'>Contact Us</a>
		</div>
	</div>

	<!-- modal content -->
	<div id="basic-modal-content">
		<div id='homer2' style="background:#ececec; width:100%; margin:0px;">
		<div style="padding:10px;">
			<strong>Contact US</strong><br/>
			<table style="width:100%;" class="contacttb">
				<tr>
					<td>Name</td>
					<td>
						<input id="txtName2" type="text" value="Khuong Xuan Truong"/>
					</td>
				</tr>
				<tr>
					<td>Email</td>
					<td>
						<input id="txtEmail2" type="text" value="KhuongXuanTruong@gmail.com"/>
					</td>
				</tr>
				<tr>
					<td>Country</td>
					<td>
						<input id="txtCountry2" type="text" value="Ho Chi Minh"/>
					</td>
				</tr>
				<tr>
					<td>Phone</td>
					<td>
						<input id="txtPhone2" type="text" value="84985747240"/>
					</td>
				</tr>
				<tr>
					<td>Address</td>
					<td>
						<input id="txtAddress2" type="text" value="181/19 Hong Lac P.10 Q.Tan Binh"/>
					</td>
				</tr>
				<tr>
					<td>Type</td>
					<td>
						<select id="cbxType2">
							<optgroup label="Select Type">
								<option value="develop">We develop games.</option>
								<option value="publish">We publish games.</option>
								<option value="payment">We have payment systems.</option>
								<option value="question">We have questions.</option>
							</optgroup>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2" >Content</td>
				</tr>
				<tr>
					<td colspan="2">
						<div style="padding:0px 8px">
							<textarea rows="10" id="txtContent2" style="width:100%;margin:0;padding:0;resize:none;"></textarea>
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="2" id="contact_errmsg2">
						&nbsp;
					</td>
				</tr>
				<tr>
					<td colspan="2">
						<div style="padding:0px;text-align:center;vertical-align: middle;">
							<input id="btnContact_Submit2" type="button" value="Submit" style="height:24px;width:100px;font-size:11px;"/>
							<a class="loadding2" href="javascript:void(0);" style="color:#E0375;background: url(Images/ajax-loader1-2.gif) no-repeat 4px 50%; width:150px;padding-left:24px;display:none;">Please, waitting...</a>
						</div>
					</td>
				</tr>
				
			</table>
		</div>
		</div>
	</div>

	<!-- preload the images -->
	<div style='display:none'>
		<img src='Images/basic/x.png' alt='' />
	</div>
	
	<div style="width: 880px;
			
			border: 10px solid #E1002A;">
		<h1>Contact Manage</h1>
		<?
		require ('Controller/ContactController.php');
		$page=isset($_REQUEST["page"])?$_REQUEST["page"]:1;
		$data=ConntactModule::getContacts(10,$page-1);
		$numpage=ConntactModule::getContacts_numpage(10);
		?>
		<table class="contactinfo" style="display:none;border:1px solid;width:100%;">
			<tr>
				<th colspan=4 style="background:#d7d7d7;text-align:center;">Contact Info</th>
			</tr>
			<tr>
				<th>Key</th>
				<td id="infokey"></td>
				<th>Insert</th>
				<td id="infoinsert"></td>
			</tr>
			<tr>
				<th>Name</th>
				<td id="infoname"></td>
				<th>Email</th>
				<td id="infoemail"></td>
			</tr>
			<tr>
				<th>Country</th>
				<td id="infocountry"></td>
				<th>Phone</th>
				<td id="infophone"></td>
			</tr>
			<tr>
				<th>Address</th>
				<td id="infoaddress"></td>
				<th>Type</th>
				<td id="infotype"></td>
			</tr>
			<tr>
				<th colspan=4>Content</th>
			</tr>
			<tr>
				<td id="infocontent"></td>
			</tr>
		</table>
		<table class="tb" style="
			border-collapse: collapse;
			display: table;
border-collapse: separate;
border-spacing: 1px;
border-color: #111;
width:100%;
		">
			<tr>
				<th colspan=8>Contact List</th>
			</tr>
			<tr>
				<th>
					Key
				</th>
				<th>
					Name
				</th>
				<th>
					Email
				</th>
				<th>
					Country
				</th>
				<th>
					Phone
				</th>
				<th>
					Address
				</th>
				<th>
					Type
				</th>
				<th>
					Insert
				</th>
				<th style="display:none;">
					Contact
				</th>
			</tr>
			<?
			if($data!=null){
			foreach($data as $row){
			?>
			<tr class="data">
				<td class="key"><?=$row["key"]?></td>
				<td class="name"><?=$row["name"]?></td>
				<td class="email"><?=$row["email"]?></td>
				<td class="country"><?=$row["country"]?></td>
				<td class="phone"><?=$row["phone"]?></td>
				<td class="address"><?=$row["address"]?></td>
				<td class="type"><?=$row["type"]?></td>
				<td class="insert"><?=$row["insert"]?></td>
				<td class="content" style="display:none;"><?=$row["content"]?></td>
			</tr>
			
			<?
			}
			}
			?>
			<tr>
				<td colspan=8>
				<?
				if($numpage>0)for($i=1;$i<=$numpage;$i++){
					echo "<a class='pages' href='contacttool.php?page=$i'>$i</a>";
				}
				?>
				</td>
			</tr>
		</table>
		<script>
			$("table tr.data").click(
				function(){
					$(".contactinfo").show();
					$("table.tb tr.data.active").removeClass("active");
					$(this).addClass("active");
					$("#infokey").html($(this).find("td.key").html());
					$("#infoname").html($(this).find("td.name").html());
					$("#infoemail").html($(this).find("td.email").html());
					$("#infocountry").html($(this).find("td.country").html());
					$("#infophone").html($(this).find("td.phone").html());
					$("#infoaddress").html($(this).find("td.address").html());
					$("#infotype").html($(this).find("td.type").html());
					$("#infocontent").html($(this).find("td.content").html());
				}
			);
		</script>
	</div>
	
	
	


	<!--<div id="foot"></div>

	<div id="foot_1">ⓒ Neowiz Internet Vietnam One Member Co., Ltd. All rights reserved.</div>

	<div id="foot_3">

		NEOWIZ FAMILY COMPANIES<br />
		NEOWIZ SERVICE BRANDS

	</div>

	<div id="foot_2">37 Ton Duc Thang Street, Ben Nghe Ward, District 1, HCMC, Vietnam</div>

	<div id="foot_4">

		<a href="http://neowiz.com"					target="_blank">NEOWIZ</a>				&nbsp; | &nbsp;
		<a href="http://neowizgames.com/ngames_eng"	target="_blank">NEOWIZ GAMES</a>		&nbsp; | &nbsp;
		<a href="http://neowizinternet.com"			target="_blank">NEOWIZ INTERNET</a>		&nbsp; | &nbsp;
		<a href="http://eng.neowizmobile.com"		target="_blank">NEOWIZ MOBILE</a>		&nbsp; | &nbsp;
		<a href="http://neowizins.com"				target="_blank">NEOWIZ INS</a>			&nbsp; | &nbsp;
		<a href="#"									target="_blank">NEOWIZ INVESTMENT</a><br />

		<a href="http://pmang.com"		target="_blank" title="The no.1 game portal in Korea.">PMANG</a>	&nbsp; | &nbsp;
		<a href="http://pmangplus.com"	target="_blank">PMANG PLUS</a>										&nbsp; | &nbsp;
		<a href="http://bugs.co.kr"		target="_blank">BUGS</a>											&nbsp; | &nbsp;
		<a href="http://sayclub.com"	target="_blank">SAY CLUB</a>										&nbsp; | &nbsp;
		<a href="http://magictree.org"	target="_blank">MAGIC TREE</a>

	</div>-->

</div>
<script type='text/javascript' src='JQuery/jquery.simplemodal.js'></script>
<script type='text/javascript' src='JQuery/basic.js'></script>
<script>
    $("#btnContact_Submit2").click(
		function(){
			
			if(!_FcheckFilled($("#txtName2").val())){$("#txtName2").focus();return;}
			if(!_FcheckFilled($("#txtEmail2").val())){$("#txtEmail2").focus();return;}
			if(!_FcheckEmail($("#txtEmail2").val())){$("#txtEmail2").focus();return;}
			if(!_FcheckFilled($("#txtCountry2").val())){$("#txtCountry2").focus();return;}
			if(!_FcheckFilled($("#txtPhone2").val())){$("#txtPhone2").focus();return;}
			if(!_FcheckFilled($("#txtAddress2").val())){$("#txtAddress2").focus();return;}
			if(!_FcheckFilled($("#txtContent2").val())){$("#txtContent2").focus();return;}
			$(".loadding2").show();
			$("#btnContact_Submit2").hide();
			var surl="Controller/ContactController.php";
			var sdata={
				"Controller":"ContactController",
				"action":"insertContact",
				"name": Trim($("#txtName2").val()),
				"email": Trim($("#txtEmail2").val()),
				"country": Trim($("#txtCountry2").val()),
				"phone": Trim($("#txtPhone2").val()),
				"address": Trim($("#txtAddress2").val()),
				"type": Trim($("#cbxType2").val()),
				"content": Trim($("#txtContent2").val())
			};
			jQuery.ajax({
				type:"POST", 
				data:sdata, 
				dataType:"text", 
				url:surl, 
				success: function (data){ 
					if(data=="true"){
						$("#contact_errmsg2").html("<a class='ajax' href='ContacUS/ContactUS.php'>Contact Sussess.Click here to create new contact.</a>");
						//$(".ajax").colorbox();
						$(".loadding2").hide();
					}else{
						$("#contact_errmsg2").html("Fail. Please, try again!"+data);
						$(".loadding2").hide();
					}

				},
				error: function (xhr, ajaxOptions, thrownError){
					//$("#err_msg001").append("<li><b>Status</b>:"+xhr.status+"<br/><b>ThrownError</b>:"+thrownError+"</li>");
					
				}
			});
		}
	);
</script>
	</body>

</html>



<!-- <?= $_SERVER[ "HTTP_USER_AGENT" ] ?> -->
